#include <iostream>
#include <vector>
#include <climits>
using namespace std;

int main() {
    int n, x;
    cin >> n >> x;
    vector<int> nums(n);
    for (auto& e : nums)
        cin >> e;

    vector<int> ret(2);
    int min = INT_MAX, left = 0, right = 0, sum = 0;;
    while (right < n)
    {
        if (sum < x)
            sum += nums[right++];

        while (sum >= x)
        {
            if (min > right - left + 1)
            {
                min = right - left + 1;
                ret[0] = left;
                ret[1] = right - 1;
            }
            sum -= nums[left++];
        }
    }

    cout << ret[0] + 1 << ' ' << ret[1] + 1;

    return 0;
}
// 64 位输出请用 printf("%lld")